package com.example.captcha.model;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-11-27
 * Time: 19:09
 */
@Component
@ConfigurationProperties(prefix = "captcha")
@Data
public class CaptchaProperties {
    private Integer width;
    private Integer height;
    private Session session;
    //session可以定义为一个Map结构的,但是我们的captcha_session_key有可能拿到的是错的，但是map可以编译通过
    //还是用对象比较合适
    // private Map<String,String> session;
    @Data
    public static class Session{
        private String key;
        private String data;
    }

}
